//This do file examines intergenerational human capital attainment.
//It is meant to be used with the file "intergen analysis.dta"

#delimit;



//first, adults in 1900 who were non-HoH in 1880 and age<18.  results clustered on 1880 HH.


dprobit lit1900  headlit1880  if cohort2==1 , cluster( a_Family_Group_ID ) ;
outreg2 using inter,  bdec(2) tdec(2) rdec(2) alpha(.01, .05, .1) addstat(Pseudo R2, e(r2_p)) addnote() word  bracket replace ;


dprobit lit1900  headlit1880 q1-q3 if cohort2==1 , cluster( a_Family_Group_ID );
outreg2 using inter,  bdec(2) tdec(2) rdec(2) alpha(.01, .05, .1) addstat(Pseudo R2, e(r2_p)) addnote() word  bracket append ;


dprobit lit1900 headlit1880 q1-q3 male1900 age age2 if cohort2==1 , cluster( a_Family_Group_ID );
outreg2 using inter,  bdec(2) tdec(2) rdec(2) alpha(.01, .05, .1) addstat(Pseudo R2, e(r2_p)) addnote() word  bracket append ;



//next, kids in 1900.

dprobit lit1900  headlit1900 if cohort3==1 & age>10 & age<18, robust ;
outreg2 using inter, bdec(2) tdec(2) rdec(2) alpha(.01, .05, .1) addstat(Pseudo R2, e(r2_p)) addnote() word  bracket append ;


dprobit lit1900  headlit1900 headq1-headq3 if cohort3==1 & age>10 & age<18, robust ;
outreg2 using inter,  bdec(2) tdec(2) rdec(2) alpha(.01, .05, .1) addstat(Pseudo R2, e(r2_p)) addnote() word  bracket append ;


dprobit lit1900 headlit1900 headq1-headq3 male1900 age age2 if cohort3==1 & age>10 & age<18 , robust; 
outreg2 using inter,  bdec(2) tdec(2) rdec(2) alpha(.01, .05, .1) addstat(Pseudo R2, e(r2_p)) addnote() word  bracket append ;


